package com.gmail.hongyz.myfuse.model;

import java.util.HashMap;
import java.util.Map;

import com.gmail.hongyz.myfuse.common.Constants;

public class Role {

	private String role;
	private static Role pm = new Role(Constants.ROLE_PM);
	private static Role dev = new Role(Constants.ROLE_DEV);
	private static Role qa = new Role(Constants.ROLE_QA);
	private static Map<String, Role> roles;
	static {
		roles = new HashMap<String, Role>();
		roles.put(Constants.ROLE_PM, pm);
		roles.put(Constants.ROLE_DEV, dev);
		roles.put(Constants.ROLE_QA, qa);
	}

	private Role(String role) {
		this.role = role;
	}
	public static Role getRole(String role) {
		return roles.get(role);
	}
	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}
	
}
